package petrochina.company.electric.model;

import java.util.List;
import java.util.Objects;

/**
 * 任务申请线路数据
 */
public class TaskFillStationData {

    // id
    private long id;
    private long areaId;
    private String stationName;
    private int status;
    private List<TaskFillUserData> users;
    private String createTime;
    private boolean isWrite = false;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getAreaId() {
        return areaId;
    }

    public void setAreaId(long areaId) {
        this.areaId = areaId;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<TaskFillUserData> getUsers() {
        return users;
    }

    public void setUsers(List<TaskFillUserData> users) {
        this.users = users;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public boolean isWrite() {
        return isWrite;
    }

    public void setWrite(boolean write) {
        isWrite = write;
    }

    //    public static Creator<TaskFillStationData> getCREATOR() {
//        return CREATOR;
//    }

//    @Override
//    public int describeContents() {
//        return 0;
//    }

//    @Override
//    public void writeToParcel(Parcel dest, int flags) {
//        dest.writeLong(this.id);
//        dest.writeLong(this.areaId);
//        dest.writeString(this.stationName);
//        dest.writeParcelableList(this.users, 0);
//        dest.writeInt(this.status);
//        dest.writeString(this.createTime);
//    }
//
//    public void readFromParcel(Parcel source) {
//        this.id = source.readLong();
//        this.areaId = source.readLong();
//        this.stationName = source.readString();
//        this.status = source.readInt();
//        this.status = source.readParcelableList();
//        this.createTime = source.readString();
//    }


    public TaskFillStationData(long id, long areaId, String stationName, int status, List<TaskFillUserData> users, String createTime) {
        this.id = id;
        this.areaId = areaId;
        this.stationName = stationName;
        this.status = status;
        this.users = users;
        this.createTime = createTime;
    }

//    protected TaskFillStationData(Parcel in) {
//        this.id = in.readLong();
//        this.circuitName = in.readString();
//        this.status = in.readInt();
//        this.createTime = in.readString();
//    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TaskFillStationData)) return false;
        TaskFillStationData that = (TaskFillStationData) o;
        return getId() == that.getId();
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getAreaId(), getStationName(), getStatus(), getUsers(), getCreateTime());
    }

//    public static final Creator<TaskFillStationData> CREATOR = new Creator<TaskFillStationData>() {
//        @Override
//        public TaskFillStationData createFromParcel(Parcel source) {
//            return new TaskFillStationData(source);
//        }
//
//        @Override
//        public TaskFillStationData[] newArray(int size) {
//            return new TaskFillStationData[size];
//        }
//    };
}
